-- GENERATED SPELL FOR [Ilkrud Magthrull] --


function spell0_3664(pUnit, Event) --@Ilkrud\'s Guardians,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(6487,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_3664', 1, 1)
end

function spell1_3664(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20791,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3664', 3000, 1)
end

function spell2_3664(pUnit, Event) --@Summon Succubus,Self--
pUnit:FullCastSpellOnTarget(8722,pUnit)
pUnit:RegisterEvent('Sorts_3664', 604, 1)
end

function Sorts_3664(pUnit, Event)
local choix_sorts_3664 = math.random(0, 2)
if choix_sorts_3664 == 0 then
pUnit:RegisterEvent('spell0_3664', 1, 1)
end
if choix_sorts_3664 == 1 then
pUnit:RegisterEvent('spell1_3664', 1, 1)
end
if choix_sorts_3664 == 2 then
pUnit:RegisterEvent('spell2_3664', 1, 1)
end
end

function mob3664_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3664', math.random(1500, 3000), 1)
end

function mob3664_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3664_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3664_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3664, 1, 'mob3664_Action')
RegisterUnitEvent(3664, 2, 'mob3664_Leave')
RegisterUnitEvent(3664, 3, 'mob3664_Kill')
RegisterUnitEvent(3664, 4, 'mob3664_Die')
